/***************************************
 2010-5-5
****************************************/
package com.happy.action.ariticle;

import org.springframework.beans.factory.annotation.Autowired;

import com.core.orm.hibernate.Page;
import com.happy.entity.Ariticle;
import com.happy.services.AriticleServices;
import com.opensymphony.xwork2.ActionSupport;

public class AriticleAction  extends ActionSupport{
	@Autowired
	AriticleServices services;
	private static final long serialVersionUID = -2059312334921590955L;
	private Page<Ariticle> ariticlePage=new Page<Ariticle>(10,true);
	private Ariticle ariticle;
	private long id;
	/**默认无参构造函数**/
	public AriticleAction() {
	}
	public String execute() throws Exception
	{
		ariticle=services.get(id);
		return SUCCESS;
	}
	public String list() throws Exception
	{
		ariticlePage=services.findByPage(ariticlePage);
		return "list";
	}
	public AriticleServices getServices() {
		return services;
	}
	public void setServices(AriticleServices services) {
		this.services = services;
	}
	public Page<Ariticle> getAriticlePage() {
		return ariticlePage;
	}
	public void setAriticlePage(Page<Ariticle> ariticlePage) {
		this.ariticlePage = ariticlePage;
	}
	public Ariticle getAriticle() {
		return ariticle;
	}
	public void setAriticle(Ariticle ariticle) {
		this.ariticle = ariticle;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	
}
